import numpy as np

arr = np.array([3,1,2])
index = arr.argsort()
print("索引排序后：", index)
print("数组排序后：", arr[index])

